package com.ocom.xcxapi.controller;

import com.ocom.common.constant.CompanyServiceUrl;
import com.ocom.common.resp.Result;
import com.ocom.security.utils.SecurityUtils;
import com.ocom.xcxapi.service.CompanyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@PreAuthorize("hasRole('ROLE_XCX')")
@RestController
public class PhoneController {


    @Autowired
    private CompanyService companyService;

    /**
     * 2.5.手机号绑定(user/bindPhone)
     * */
    @GetMapping(CompanyServiceUrl.URL_UserBindPhone)
    public Result UserBindPhone(Long comId,String code,String openid){

        return companyService.UserBindPhone(comId,code,openid);
    }

}
